home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_02_1984_Transactor_Publishing.d64
/
quadra 64.src
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
5KB
|
246 lines
0 rem the transactor volume 5 issue 03 page 33
80 sys 700
90 .opt oo
100 ;
110 ;********************************
120 ;* quadra 64 *
130 ;* may 14, 1984 *
140 ;* by daniel bingamon *
150 ;* for the transactor *
160 ;********************************
170 ;
180 ; label definitions
190 ;
200 *=$c000
210 chrget = $73
220 chr(NULL)t = $79
230 ptr = $7a
240 intger = $14
250 temp = $fb
260 eval = $ad9e
270 convrt = $b7f7
280 print = $ab1e
290 dispch = $0308
300 intrpt = $0314
310 basic = $002b
320 memsiz = basic+10
330 tmpadd = $14
340 fst = $0800
350 snd = $2800
360 trd = $4800
370 fth = $6800
380 lmt = $a000
390 ;
400 ; initialization
410 ;
420 init lda #>wedge ;init wedge
430 ldy #<wedge
440 sta dispch+1
450 sty dispch
460 lda #>intprg ;enable interupt
470 ldy #<intprg
480 sei
490 sta intrpt+1
500 sty intrpt
510 cli
520 ldy #00 ;zero first byte
530 sty fst ;of partitions.
540 sty snd
550 sty trd
560 sty fth
570 lda #00
580 sta memsiz
590 lda #28
600 sta memsiz+1
610 lda #0 ;startup in
620 sta partit ;partition 0.
630 lda #<msg ;print title.
640 ldy #>msg
650 jsr print
660 lda #00
670 sta onetim
680 jsr pr1
690 nop
700 nop
710 rts
720 msg .byte $93: .asc "quadra 64": .byte $0d
730 .byte $0d: .asc "by: daniel bingamon"
740 .byte $0d: .asc "for the transactor"
750 .byte $0d,$00,$00,$00
760 wedge jsr chrget
770 cmp #"\" ;if pound sign
780 beq parse ;process wedge.
790 cmp #":"
800 beq wedge
810 exit1a jmp $a7e7
820 exit jmp $a474
830 tapspc .byte $00,$00,$00,$00,$00,$00
840 ;
850 ; process wedge command
860 ;
870 parse pha
880 jsr savmem ;store old part. data
890 pla
900 jsr chrget
910 cmp #00
920 bne contin
930 irqint jmp intchk
940 partit *=*+1
950 .byte $00,$00,$00
960 erroc jmp errchk
970 contin cmp #"4"
980 bcs irqint
990 pha
1000 and #$cf
1010 sta partit
1020 pla ;jump to individual
1030 cmp #"0" ;partition routines
1040 beq one
1050 cmp #"1"
1060 beq two
1070 cmp #"2"
1080 beq three
1090 cmp #"3"
1100 beq four
1110 bne irqint
1120 one jmp pr1
1130 two jmp pr2
1140 three jmp pr3
1150 four jmp pr4
1160 ;
1170 ; partition select table
1180 ;
1190 bnk1 .word $0801,$0801,$0801,$2800
1195 .word $2800,$2800,$2800,$2800,$0000
1200 bnk2 .word $2801,$2801,$2801,$4800
1205 .word $4800,$4800,$4800,$4800,$0000
1210 bnk3 .word $4801,$4801,$4801,$6800
1215 .word $6800,$6800,$6800,$6800,$0000
1220 bnk4 .word $6801,$6801,$6801,$a000
1225 .word $a000,$a000,$a000,$a000,$0000
1230 errchk cmp #"k"
1240 bne error
1250 lda #$a7
1260 sta dispch+1
1270 lda #$e4
1280 sta dispch
1290 lda #$01
1300 sta basic
1310 lda #$08
1320 sta basic+1
1330 lda #$00
1340 sta memsiz
1350 lda #$a0
1360 sta memsiz+1
1370 jmp exit
1380 error jmp $af08 ;syntax error
1390 intchk lda #>intprg
1400 ldy #<intprg
1410 sei
1420 sta intrpt+1
1430 sty intrpt
1440 cli
1450 ldx partit ;print part. no.
1460 lda #00
1470 jsr $bdcd ;print integer routine
1480 jmp exit
1490 intprg lda $c5
1500 cmp #63
1510 bne skp ;escape quote mode
1520 lda #0 ;when stop key
1530 sta $d4 ;depressed.
1540 skp lda $028d ;enable freezing
1550 cmp #06 ;with ctrl & comm.
1560 bne skp2 ;keys.
1570 cloop jsr $ff9f ;ctrl & shift to
1580 lda $028d ;resume operation.
1590 cmp #05
1600 bne cloop
1610 skp2 jmp $ea31
1620 ;
1630 pr1 ldx #00 ;partition 1.
1640 lp1 lda bnk1,x
1650 sta basic,x
1660 inx
1670 cpx #$0f
1680 bne lp1
1690 lda basic+1
1700 sta $fc
1710 lda #00
1720 sta $fb
1730 tay
1740 sta (temp),y
1750 lda onetim
1760 cmp #00
1770 bne no
1780 lda #01
1790 sta onetim
1800 rts
1810 no jmp exit
1820 pr2 ldx #00 ;partition 2.
1830 lp2 lda bnk2,x
1840 sta basic,x
1850 inx
1860 cpx #$0f
1870 bne lp2
1880 lda basic+1
1890 sta $fc
1900 lda #00
1910 sta $fb
1920 tay
1930 sta (temp),y
1940 jmp exit
1950 pr3 ldx #00 ;partition 3.
1960 lp3 lda bnk3,x
1970 sta basic,x
1980 inx
1990 cpx #$0f
2000 bne lp3
2010 lda basic+1
2020 sta $fc
2030 lda #00
2040 sta $fb
2050 tay
2060 sta (temp),y
2070 jmp exit
2080 pr4 ldx #00 ;partition 4.
2090 lp4 lda bnk4,x
2100 sta basic,x
2110 inx
2120 cpx #$0f
2130 bne lp4
2140 lda basic+1
2150 sta $fc
2160 lda #00
2170 sta $fb
2180 tay
2190 sta (temp),y
2200 jmp exit
2210 savmem ldx #00 ;save old pointers
2220 savlp2 lda partit
2230 cmp #00
2240 beq sm1
2250 cmp #01
2260 beq sm2
2270 cmp #02
2280 beq sm3
2290 bne sm4
2300 savlp1 inx
2310 cpx #$0f
2320 bne savlp2
2330 rts
2340 sm1 lda basic,x ;load pointer from
2350 sta bnk1,x ;each partition.
2360 jmp savlp1
2370 sm2 lda basic,x
2380 sta bnk2,x
2390 jmp savlp1
2400 sm3 lda basic,x
2410 sta bnk3,x
2420 jmp savlp1
2430 sm4 lda basic,x
2440 sta bnk4,x
2450 jmp savlp1
2460 onetim .byte $00 ;first time indicator.
2470 .end